{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "this animal's name is :sb2.0\n"
     ]
    }
   ],
   "source": [
    "class animal:\n",
    "    def __init__(self,name,age):\n",
    "        self.Name = name\n",
    "        self.Age = age\n",
    "    \n",
    "    def __changeName(self,name):\n",
    "        self.Name = name\n",
    "    \n",
    "    def getName(self):\n",
    "        self.__changeName(\"sb2.0\")\n",
    "        print \"this animal's name is :%s\"%self.Name\n",
    "\n",
    "        \n",
    "tiger = animal(\"sb\",2)\n",
    "tiger.getName()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 2",
   "language": "python",
   "name": "python2"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 2
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython2",
   "version": "2.7.10"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 0
}
